<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<script type="text/javascript" src="../public/lib/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="../public/lib/jquery/1.9.1/jquery.min.js"></script>
<#include "lib/lib.html" />
<title>修改物业</title>
</head>
<body>
<div class="pd-20">
	<form action="${basePath}/property/updateProperty.do" method="post"  class="form form-horizontal" id="form-area-add" enctype="multipart/form-data">
		<div class="row cl">
			<input type="hidden" name="id" value="${info.id}">
			<label class="form-label col-3"><span class="c-red">*</span>所属地区：</label>
			<div class="formControls col-5"> <span class="select-box" >
				<select class="select" id="areaId" name="areaId" nullmsg="请选择">
					<#if areaList?? && areaList?size gt 0>
						<#list areaList as dl >
							<option value="${dl.id}" <#if info.areaId == dl.id>selected="selected"</#if>>${dl.areaName}</option>
						</#list>
					</#if>
				</select>
			</span> 
			</div>
			<div class="col-3"> </div>
		</div>
		<div class="row cl">
			<label class="form-label col-3"><span class="c-red">*</span>物业名称：</label>
			<div class="formControls col-5">
				<input type="text" class="input-text" value="${info.propertyName}" id="propertyName" name="propertyName">
			</div>
			<div class="col-4"> </div>
		</div>
		<div class="row cl">
			<label class="form-label col-3"><span class="c-red">*</span>联系人电话：</label>
			<div class="formControls col-5">
				<input type="text" class="input-text" value="${info.contactsMobile}" id="contactsMobile" name="contactsMobile">
			</div>
			<div class="col-4"> </div>
		</div>
		<div class="row cl">
			<label class="form-label col-3"><span class="c-red">*</span>联系人姓名：</label>
			<div class="formControls col-5">
				<input type="text" class="input-text" value="${info.contactsName}"  id="contactsName" name="contactsName">
			</div>
			<div class="col-4"> </div>
		</div>
		<div class="row cl">
			<label class="form-label col-3"><span class="c-red">*</span>收款人姓名：</label>
			<div class="formControls col-5">
				<input type="text" class="input-text" id="receivaName" value="${info.receivaName!}" name="receivaName">
			</div>
			<div class="col-4"> </div>
		</div>
		<div class="row cl">
			<label class="form-label col-3"><span class="c-red">*</span>收款银行账号：</label>
			<div class="formControls col-5">
				<input type="text" class="input-text" id="receivaAccount" value="${info.receivaAccount!}" name="receivaAccount">
			</div>
			<div class="col-4"> </div>
		</div>
		<div class="row cl">
			<label class="form-label col-3"><span class="c-red">*</span>收款银行：</label>
			<div class="formControls col-5">
				<input type="text" class="input-text" id="receivaBank" value="${info.receivaBank!}" name="receivaBank">
			</div>
			<div class="col-4"> </div>
		</div>
		<div class="row cl">
			<label class="form-label col-3">物业类型：</label>
			<div class="formControls col-5">
				<div class="radio-box">
					<input name="propertyType" type="radio" value="1" <#if info.propertyType==1>checked</#if>>
					<label for="sex-1">小区</label>
				</div>
				<div class="radio-box">
					<input type="radio" value="2" name="propertyType" <#if info.propertyType==2>checked</#if>>
					<label for="sex-2">办公楼</label>
				</div>
				<div class="radio-box">
					<input type="radio" value="3" name="propertyType" <#if info.propertyType==3>checked</#if>>
					<label for="sex-2">其他</label>
				</div>
			</div>
			<div class="col-4"> </div>
		</div>
		<div class="row cl">
			<label class="form-label col-3">结算方式：</label>
			<div class="formControls col-5">
				<div class="radio-box">
					<input name="propertyProportions" type="radio" value="1" <#if info.propertyProportions==1>checked</#if>>
					<label>洗车数量</label>
				</div>
				<div class="radio-box">
					<input type="radio" value="2" name="propertyProportions" <#if info.propertyProportions==2>checked</#if>>
					<label>按月固定资金</label>
				</div>
			</div>
			<div class="col-4"> </div>
		</div>
		<div class="row cl">
			<div class="col-9 col-offset-3">
				<button type="button" onclick="submitBtn()" class="btn btn-success radius" id="admin-role-save" name="admin-role-save">
						<i class="icon-ok"></i> 确定
				</button>
				<button type="button" onclick="layer_close()" class="btn btn-success radius" id="admin-role-close"
						name="admin-role-close">
						<i class="icon-ok"></i>取消
					</button>
			</div>
		</div>
	</form>
</div>
<script type="text/javascript">
function submitBtn(){
	var areaId = $("#areaId").val();
	if(areaId == ""){
		layer.msg('请选择区域', {
			icon : 1,
			time : 1000
		});
		return ;
	}
	var propertyName = $("#propertyName").val();
	if(propertyName != 1 && propertyName == ""){
		layer.msg('物业名称不能为空', {
			icon : 1,
			time : 1000
		});
		return ;
	}
	var contactsMobile = $("#contactsMobile").val();
	if(contactsMobile != 1 && contactsMobile == ""){
		layer.msg('联系人电话不能为空', {
			icon : 1,
			time : 1000
		});
		return ;
	}
	var contactsName = $("#contactsName").val();
	if(contactsName != 1 && contactsName == ""){
		layer.msg('联系人姓名不能为空', {
			icon : 1,
			time : 1000
		});
		return ;
	}
	$("#form-area-add").ajaxForm({
		success:function(data) {
			if(data == 200){
				layer.msg('修改成功!', {icon: 6,time:1000});
				window.parent.location.href="${basePath}/property/list.do";
			}else{
				layer.msg("修改异常", {icon: 5,time:1000});
			}
		},      
		dataType:"json"   
	}).submit(); 	
}
</script>
</body>
</html>